import api from '@/services/shop/classify-management';

export type ShopClassifyManagement = ShopClassifyManagementApi.InfoResponse;

export const getAllList = async () => {
  const res = await api.getAllList<ShopClassifyManagement[]>();
  return res.data;
};
export const getInfo = async (params: ShopClassifyManagementApi.InfoParams) => {
  const res = await api.getInfo<ShopClassifyManagement>(params);
  return res.data;
};
export const create = async (params: ShopClassifyManagementApi.CreateParams) => {
  const data = await api.create(params);
  return data;
};
export const update = async (params: ShopClassifyManagementApi.UpdateParams) => {
  const data = await api.update(params);
  return data;
};
export const remove = async (params: ShopClassifyManagementApi.DeleteParams) => {
  const data = await api.remove(params);
  return data;
};
export default {
  getAllList,
  create,
  update,
  remove,
};
